Repository navigation
Conversation
|
@askov is attempting to deploy a commit to the Solana Foundation Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
[Medium impact] The PR appears safe to merge; no actionable defect was found. SummarySplits specs between Node and jsdom, uses worker threads, and reduces repeated setup and test code.
Reviews (6) · Last reviewed commit: "chore(vitest): rename hoo-611 fixture an..." · Reviewed by Greptile |
askov
force-pushed
the
chore/vitest-environments
branch
from
October 6, 2026 09:24
314d7f6 to
ae00b36
Compare
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
mikhd
reviewed
Oct 9, 2026
mikhd
reviewed
Oct 9, 2026
mikhd
reviewed
Oct 12, 2026
mikhd
reviewed
Oct 12, 2026
askov
force-pushed
the
chore/vitest-environments
branch
from
October 12, 2026 13:05
ae00b36 to
9eec314
Compare
stefangovedarov86-hash
approved these changes
Oct 12, 2026
mikhd
reviewed
Oct 14, 2026
mikhd
approved these changes
Oct 14, 2026
Every spec file created a jsdom window, which costs about half a second per file. A `.ts` spec runs in node unless it declares `// @vitest-environment jsdom`, and specs run in worker threads. The spec suite takes 37 s instead of 75 s.
Node 22.1 to 22.6 read `--eval` input as CommonJS, so top-level await throws before the pipeline imports run.
askov
force-pushed
the
chore/vitest-environments
branch
from
October 15, 2026 06:35
bedd6bb to
6b2dc62
Compare
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
A
.tsspec runs in node instead of jsdom, and each spec file runs in a worker thread. The spec suite takes about half the time.Speed
vitest runTest specs, slowest shardTest specs, both shards added upLocal numbers are the mean of two runs each, at 7e25002. CI before is the median of 27 green PR runs since #1383 reduced CI to two shards. CI after is the median of this PR's three runs. The CI wait stays the same, because
Build-Infowaits forBuild-And-Testand finishes last in 26 of 27 runs.Changes
specsVitest project intospecs-domfor.tsxspecs andspecs-nodefor.tsspecs..tsspec in jsdom only when it declares// @vitest-environment jsdom.CONTRIBUTING.mdasks for the comment on the first line.threadspool for the spec projects.server.deps.inlinelist fromvite.config.mts.@testing-library/jest-domintest-setup.tsonly whendocumentexists.Bufferinstanceof Uint8Arraypatch intest-setup.tstoUint8Arrayonly, not to its subclasses.it.eachtables.triggerDownloadbefore the base64 check, so an oversized payload fails before the scan.date-fnsfunctions from subpaths.formatAnchorIdlandformatCodamaIdlfrom their hooks.Type of change
Screenshots
No UI change.
Testing
pnpm exec vitest list --filesOnly --project specs-dom, then the same with--project specs-node. Expect each spec file outsidepackages/in exactly one list.pnpm test:ci:specsonmasterand on this branch. Expect about half the wall time on this branch.Related Issues
Closes HOO-1913
Checklist
pnpm test,pnpm lint,pnpm typecheck)build:infoscript to update build information